﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ClientBilling.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Place Billed Call by Case</title>
    <link href="Intranet.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <form runat="server">
        <asp:ScriptManager runat="server" ID="DefaultWindowScriptManager" ScriptMode="Auto"></asp:ScriptManager>
            <h3>Place Billed Call by Case</h3>
            <asp:Repeater id="ClientRepeater" runat="server" DataSourceID="ClientDataSource" OnItemDataBound="ClientRepeater_ItemDataBound">
                <ItemTemplate>
                    <div class="client">
                        <div class="clientName">
                            <asp:Label runat="server" ID="ClientLabel"><%# DataBinder.Eval(Container.DataItem, "Name") %></asp:Label>
                        </div>
                        <asp:Repeater runat="server" ID="CaseRepeater" OnItemDataBound="CaseRepeater_ItemDataBound" >
                            <ItemTemplate>
                                <div class="caseName">
                                    <asp:ImageButton runat="server" ID="CallButton" ImageUrl="~/Images/clicktocall_general_16.png" />
                                    <asp:LinkButton runat="server" ID="CaseLabel" ><%# DataBinder.Eval(Container.DataItem, "FullName") %></asp:LinkButton>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
<%--        <asp:ListBox runat="server" ID="CaseListBox"></asp:ListBox>
--%>        <br />
            <a href="Billing/Billing.aspx" target="_blank">View Billed Calls</a>
            
        <asp:Button runat="server" ID="CleanupButton" Text="Clean Up" PostBackUrl="~/Intranet.aspx" 
            onclick="CleanupButton_Click" Visible="false" />
        <asp:Button ID="StartupButton" runat="server" Text="Start Up" 
            onclick="StartupButton_Click" Visible="false" />
            <asp:ObjectDataSource ID="ClientDataSource" runat="server" 
                SelectMethod="GetClients" TypeName="ClientBilling.CrmSystem">
                <SelectParameters />
            </asp:ObjectDataSource>
    </form>
</body>
</html>
